{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('web/index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li>
			<a href="{:url('index')}">线下会员列表</a>
		</li>
		<li><strong>导入线下会员</strong></li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('padd_ok')}" enctype="multipart/form-data" onsubmit="return toVaild()">
      			<div class="form-group">
						<label class="col-sm-3 control-label">导入文件</label>
							<input type="file" name="myfile" id="myfile" value=""/><samp></samp>
					</div>
					
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;只允许导入csv格式的文件；请先<a href="{:url('dc',['data'=>'0'])}">下载样板</a>。
      			<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							<button class="btn btn-primary" type="submit" id="submit"><i class="fa fa-save"></i> 导入</button>&nbsp;&nbsp;
							<a href="{:url('index')}" class="btn btn-danger"><i class="fa fa-arrow-left"></i> 返回 </a>
						</div>
					</div>
    </form>


<div style=" height: 100px;">
{if $list !== '1'}
	<div style="width:500px; float: left;">
		<h3 style="color:red;">电话号码已存在: </h3><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{volist name="list" id='ad'}
{$ad}，
{/volist}
	</div>
{/if}
{if $list1 !== '1'}
	<div style="width:500px;float: left;">
		<h3 style="color:red;">工号已存在: </h3><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{volist name="list1" id='ad'}
{$ad}，
{/volist}
	</div>
{/if}
</div>


   </div>
		</div
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__LIB__/ueditor/ueditor.all.js" type="text/javascript"></script>
 <script>
   $(function() {
		$("#myForm").validate({
			rules: {
				myfile: "required"
			},
			messages: {
				myfile: ICON.error + ""
			},
			
		});
	});
     </script>
     <script language="javascript">
             function toVaild(){
                var val = document.getElementById("myfile").value;
                if(val == ""){
                     alert("请添加文件");
                     return false;
                 }
               
             }
                  </script>
{/block}